{% set _pageRoute = '/home' %}

{% extends "_layouts/mder.right_sidebar.twig" %}

{% block style %}
  <link href="/assets/src/blog/index.css" rel="stylesheet">
{% endblock %}

{% block body %}

{#{{ dump(_globals.lang.tran('app:test')) }}#}


      <div class="article-list">
        <div class="pull-right">
          <!-- Small button group -->
          {% if _globals.user.isLogin() %}
          <div class="btn-group btn-group-sm" role="group" aria-label="...">
              <button type="button" class="btn btn-default">Only My</button>
              <div class="btn-group btn-group-sm" role="group">
                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  Status
                  <span class="caret"></span>
                </button>
                <ul class="dropdown-menu">
                  <li><a href="#">Dropdown link</a></li>
                  <li><a href="#">Dropdown link</a></li>
                </ul>
              </div>
          </div>
          {% endif %}
        </div>

        <div class="media datetime-day">
            <div class="show-day">2016.01.12</div>
          </div>
        {% for item in articles %}
          <div class="media">
            <div class="timeline-dot"> <span class="glyphicon glyphicon-list-alt"></span> </div>

            <div class="media-left">
              <div class="datetime-time">
                {# {% set timeArr = item.publishTime|date('Y-m-d')|split('-',2) %} #}
                {# {{ timeArr[1] }} #}
                {{ item.publishTime|date("A g:i") }}
              </div>
            </div>

            <div class="media-body">
              <h4 class="media-heading">

                <a href="{{ item.route }}" title="{{ item.title }}">{{ item.title }}</a>
              </h4>
              <p>
                {{ item.digest }}
              </p>
            </div>
          </div>
        {% else %}
          <h2 style="padding-left: 200px">Oh,Have no content to display!!</h2>
        {% endfor %}

      </div>

{% endblock %}

{% block sidebar %}
  {% include 'items/blog/sidebar.twig' %}
{% endblock %}